package com.spica.platform.base.feign;

import com.spica.platform.base.config.BaseFeignConfig;
import com.spica.platform.base.feign.fallback.SmsFeignClientFallbackFactory;
import com.spica.platform.common.constant.ServiceNameConstant;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * 调用短信中心发送短信
 */
@FeignClient(name = ServiceNameConstant.SMS_SERVICE, configuration = BaseFeignConfig.class, fallbackFactory = SmsFeignClientFallbackFactory.class, decode404 = true)
public interface SmsFeignClient {

	@PostMapping(value = "/sms-internal/codes", params = {"phone"})
	String sendSmsCode(@RequestParam("phone") String phone);
}
